-
Notifications
You must be signed in to change notification settings - Fork 11
Fix compatibility with recent versions of CocoaPods (> 1.5.3) #67
Conversation
|
|
||
| s.dependency 'Gridicons', '~> 0.15' | ||
| s.dependency 'GoogleSignInRepacked', '4.1.2' | ||
| s.dependency 'GoogleSignIn', '4.1.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably update this too since this is an old version but better to do one thing at a time 😄
|
It's worth pointing out what the alternative solutions would be here:
|
|
I'd also test to make sure packaging a release works properly and passes the App Store tests. I remember something vaguely when @jleandroperez was working on this solution regarding that. |
|
I can't recall exactly in which spot things literally exploded (and forced us to repack as a dynamic framework). Archiving a binary (and doing a test upload to the AppStore), along with running the development binary directly in the device should suffice. As far as i remember the issue itself was a CocoaPods limitation. Since the Repacked framework was built... Mayb 2018?, perhaps this CocoaPods issue is already solved. Please feel free to invoke me anytime, i'd be more than happy to help!!! YAY Opensource!! |
|
Good suggestion @astralbodies. I'll try that. Thanks for the insight @jleandroperez! The CocoaPods limitation that transitive dependencies can't be static still exists, but the newish I'll dig and update here with what I find out. |
|
Awesome!! Getting rid of the repacked binary would definitely be a good move. Too much blood went into that repack script!!! |
nheagy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to login with Google with this branch. Seems good!
![]()
|
Thanks @nheagy! |
|
@jtreanor I think :hug: |

This change fixes compatibility with recent versions of CocoaPods. Once merged it will be possible to update CocoaPods in all of our projects.
The issue we are seeing is caused by
GoogleSignInRepacked. It seems that it is not behaving as a true dynamic framework and some linking changes by CocoaPods mean it doesn't work anymore. The issue is described here.The solution is to use the official
GoogleSignInpod and adds.static_framework = trueto the podspec.Changing to a static framework means that everything gets added to the main bundle. This can lead to conflicts once it is installed in an app. I have made a few changes to mitigate this:
resource_bundlesto createWordPressAuthenticatorResources.bundlewhich contains the.xcassetsfile and thejsonanimation files. Storyboards and xibs are still loaded from the main bundle.Bundle(for: WordPressAuthenticator.self)needed to be updated for this new bundle.WordPressfor classes. This was likely left over from extracting the storyboards from WordPress-iOS.To test:
Since the risk here is that resources won't be correctly loaded, its probably best to test this from within WordPress:
developof WordPress-iOS.Podfilethat sayspod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS'and comment the line above.rake dependencies